package cn.mooncode.basketballManage.mapper;

import cn.mooncode.basketballManage.pojo.Space;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jwz
 * @since 2021-03-28
 */
public interface SpaceMapper extends BaseMapper<Space> {

    /**
     * 获取所有场地信息
     * @param page
     * @param currentPage
     * @param size
     * @return
     */
    IPage<Space> getAllSpaces(Page<Space> page, Integer currentPage, Integer size);

    /**
     * 获取可选择的场地信息
     * @return
     */
    List<Space> getSelectedSpace();

    /**
     * 修改容纳球队数量
     * @param sid
     * @param num
     * @return
     */
    boolean updateTeamNum(Integer sid, Integer num);
}
